package com.ruoyi.business.domain;

import com.ruoyi.bizsys.domain.IncreasedLimitLog;

import java.math.BigDecimal;
import java.util.Date;

/**
 * @author mac
 */
public class IncreasedLimitLogVo extends IncreasedLimitLog {

    /**
     * 初始化提额
     * @param custNo
     * @param creditLine
     * @param createTime
     */
    public IncreasedLimitLogVo(String custNo, BigDecimal creditLine, Date createTime) {
        this.setCustNo(custNo);
        this.setIncreasedAmt(creditLine);
        this.setCurrentCreditLine(creditLine);
        this.setIncreasedCreditLine(creditLine);
        this.setIncreasedReason("初始化提额");
        this.setAdjustType(com.ruoyi.common.constant.Constants.RaiseLimit.ADJUST_TYPE_INIT);
        this.setCreateTime(createTime);
        this.setUpdateTime(new Date());
    }


    /**
     * 自动化提额
     * @param custNo
     * @param crrentCreditLine
     * @param increasedAmt
     */
    public IncreasedLimitLogVo(String custNo, BigDecimal crrentCreditLine,BigDecimal increasedAmt) {
        this.setCustNo(custNo);
        this.setIncreasedAmt(increasedAmt);
        this.setCurrentCreditLine(crrentCreditLine);
        this.setIncreasedCreditLine(increasedAmt.add(crrentCreditLine));
        this.setIncreasedReason("自动化提额");
        this.setAdjustType(com.ruoyi.common.constant.Constants.RaiseLimit.ADJUST_TYPE_AUTOMATIC_ALLOCATION);
        this.setCreateTime(new Date());
        this.setUpdateTime(new Date());
    }


}
